package com.gmrz.webauthn.protocol.v1.schema;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.Arrays;


public class CollectedClientData {
    @Expose
    @SerializedName("type")
    private WebOperationType type;
    @Expose
    @SerializedName("challenge")
    private byte[] challenge;
    @Expose
    @SerializedName("origin")
    private String origin;
    @Expose
    @SerializedName("tokenBinding")
    private TokenBinding tokenBinding;
    @Expose
    @SerializedName("androidPackageName")
    private String androidPackageName;


    public void setType(WebOperationType type) {
        this.type = type;
    }

    public WebOperationType getType() {
        return this.type;
    }

    public void setChallenge(byte[] challenge) {
        this.challenge = challenge;
    }

    public byte[] getChallenge() {
        return this.challenge;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getOrigin() {
        return this.origin;
    }


    public HashAlgorithmIdentifier getHashAlg() {
        return HashAlgorithmIdentifier.S256;
    }

    public TokenBinding getTokenBinding() {
        return this.tokenBinding;
    }

    public void setTokenBinding(TokenBinding tokenBinding) {
        this.tokenBinding = tokenBinding;
    }

    public String getAndroidPackageName() {
        return androidPackageName;
    }

    public void setAndroidPackageName(String androidPackageName) {
        this.androidPackageName = androidPackageName;
    }

    public String toString() {
        return
                "CollectedClientData [type=" + this.type + ", challenge=" + Arrays.toString(this.challenge) + ", origin=" + this.origin + ", tokenBinding=" + this.tokenBinding + "]";
    }
}
